#include "HtmlOutputer.h"

namespace catan
{
	HtmlOutputer::HtmlOutputer(void)
	{
	}
	
	HtmlOutputer::~HtmlOutputer(void)
	{
	}

	void HtmlOutputer::AddBreak( tstring& addString )
	{
		addString +=_T("<br>");
	}

	void HtmlOutputer::AddPriotryString( PriorityLevel::Enum priorityLevel, tstring& level )
	{
		level += _T("<font style=\"BACKGROUND-COLOR:");
		switch (priorityLevel)
		{
		case PriorityLevel::Error: level	+= _T("#FF0000"); break; //red;
		case PriorityLevel::Notice: level	+= _T("#C0C0C0"); break;	//Light Grey
		case PriorityLevel::Info: level		+= _T("#800080"); break;	//Dark Purple
		case PriorityLevel::Debug: level	+= _T("#0000FF"); break;	//Light Blue	
		case PriorityLevel::Function: level	+= _T("#408080"); break;		//Grass Green
		}
		level +=_T("\">");

		switch(priorityLevel)
		{
		case PriorityLevel::Error: level	+= _T("ERROR&nbsp;"); break;
		case PriorityLevel::Notice: level	+= _T("NOTICE"); break;
		case PriorityLevel::Info: level		+= _T("INFO&nbsp;&nbsp;"); break;
		case PriorityLevel::Debug: level	+= _T("DEBUG&nbsp;"); break;
		case PriorityLevel::Function: level	+= _T("FUNC&nbsp;&nbsp;"); break;
		}

		level +=_T("</font>");
	}

	void HtmlOutputer::AddEndLine( tstring& addString )
	{
		addString += _T("<br>");
	}

	void HtmlOutputer::AddFunctionName( const tstring& functionName, tstring& addString )
	{
		addString += functionName;
	}
};
